import React from 'react'
import {Route, Switch} from 'react-router'

export default function ManagerMain(props) {
  console.log(props);
  return (
    <div>
      <div>menu</div>
      <div>
        <Switch>
          {
            props.routes.map((route,index)=>{
              return <Route path={route.path} key={index} render={props=>{
                return <route.component {...props} routes={route.routes}></route.component>
              }}></Route>
            })
          }
        </Switch>
      </div>
    </div>
  )
}
